{% extends "PlatBundle::layout.html.twig" %}

{% block title %}企业其他信息{% endblock %}

{% block css %}

    <style>
        .patent-list{
            display: inline-block;
            margin-right: 20px;
            line-height: 30px;
        }
    </style>

{% endblock %}


{% block top %}
    {#{{ dump() }}#}
    {{ parent() }}
{% endblock %}


{% block left_body_top %}
    {{ parent() }}
{% endblock %}


{% block left_body %}
    {{ parent() }}
{% endblock %}


    {% block right_body %}
        <div class="page-header">
            <div class="page-right-top">
                <div class="right-top">
                    <span class="right-title">企业信息管理</span>
                </div>
                <div class="top-nav top-nav-active">信息详情</div>
            </div>

            <div class="main-content">
                <div class="mes-content" style="margin-top: 0;">
                    <div class="comMes-title">
                        <a class="comMes-lf fl" href="{{ path('plat_company_detail_message',{id:data.data.info.id}) }}" style="margin-left: 32px;">
                            基本信息
                        </a>
                        <a class="comMes-lf fl" href="{{ path('plat_company_other_message',{id:data.data.info.id}) }}" style="color: #1385dd;">
                            其他信息
                            <div class="comMes-lf-active"></div>
                        </a>
                    </div>

                    <div style="padding: 20px;">
                        <div class="com-item">
                            <div class="l-com-left fl a-line">企业商标</div>
                            <div class="l-com-right">
                                <img src="{{ data.data.info.trade_mark|default(asset('assets/img/icon/logo.png'))  }}" alt="" width="44" height="45">
                            </div>
                            <div class="clearfix"></div>
                        </div>

                        <div class="com-item">
                            <div class="l-com-left fl">专利</div>
                            <div class="event-type">
                                <div class="l-com-right event-list">{{ data.data.info.patent.patent_title|default('') }}</div>
                                <div class="control-show" style="top: -10px;">
                                    <span class="d-blue fl">展开</span>
                                    <span class="d-down fl"></span>
                                </div>

                                <div class="event-content">
                                    <div class="patent-list">申请号：{{ data.data.info.patent.application_number|default('') }}</div>
                                    <div class="patent-list">申请日：{{ data.data.info.patent.application_date|default('') }}</div>
                                    {#<div class="patent-list">授权公布号：</div>#}
                                    {#<div class="patent-list">授权公布日：</div>#}
                                    <div class="patent-list">专利类型：{{ data.data.info.patent.patent_type|default('') }}</div>
                                    <div class="patent-list">分类号：{{ data.data.info.patent.main_ipc|default('') }}</div>
                                    <div class="patent-list">申请人：{{ data.data.info.patent.applicant|default('') }}</div>
                                    {#<div class="patent-list">发明人：</div>#}
                                    <div>详细信息：{{ data.data.info.patent.summary|default('')|raw }}</div>
                                </div>
                            </div>
                            <div class="clearfix"></div>
                        </div>

                        <div class="com-item">
                            <div class="l-com-left fl">勋章</div>
                            <div class="l-com-right" style="width: 82%;">

                                {% for item in data.data.info.company_medal %}
                                    <div class="fl mr20">
                                        <img src="{{ asset('') ~ item.thumb }}" width="45" height="41" class="xz-icon fl">
                                        <span class="xz-name fl">{{ item.medal_name }}</span>
                                    </div>
                                {% endfor %}
                                <div class="clearfix"></div>
                            </div>
                            <div class="clearfix"></div>
                        </div>

                        <div class="com-item">
                            <div class="l-com-left fl">事件</div>

                            {% for item in data.data.info.event %}
                                <div class="event-type">
                                    <div class="l-com-right event-list">{% if item.type == 1 %}奖励{% elseif item.type == 2 %}一般{% elseif item.type == 3 %}不良{% endif %}事件</div>

                                    <div class="control-show">
                                        <span class="d-blue fl">展开</span>
                                        <span class="d-down fl"></span>
                                    </div>

                                    <div class="event-content">
                                        {{ item.company_event_content|raw }}
                                    </div>
                                </div>
                            {% endfor %}

                            <div class="clearfix"></div>
                        </div>

                        <div class="com-item">
                            <div class="l-com-left fl">历史培训信息</div>
                            <div class="l-com-right">
                                <table class="table table-hover" style="table-layout:fixed;">
                                    <thead>
                                    <tr style="background-color: #f3f9fd;">
                                        <th class="center-th">培训编号</th>
                                        <th class="center-th">培训标题</th>
                                        <th class="center-th">培训日期</th>
                                        <th class="center-th">培训机构</th>
                                        <th class="center-th">培训内容</th>
                                        <th class="center-th">参加人数</th>
                                    </tr>
                                    </thead>
                                    <tbody>
                                    {% for item in data.data.info.training_info %}
                                        <tr>
                                            <td class="center-th">{{ item.training_no }}</td>
                                            <td class="center-th">{{ item.title }}</td>
                                            <td class="center-th">{{ item.training_start_at|slice(0,10) }} - {{ item.training_end_at|slice(0,10) }}</td>
                                            <td class="center-th">{{ item.training_agency }}</td>
                                            <td class="center-th">{{ item.content }}</td>
                                            <td class="center-th">{{ item.user_num }}人</td>
                                        </tr>
                                    {% endfor %}
                                    </tbody>
                                </table>
                            </div>
                            <div class="clearfix"></div>
                        </div>

                        <div class="com-item">
                            <div class="l-com-left fl">科技联络人</div>
                            <div class="l-com-right">
                                <table class="table" style="table-layout:fixed;">
                                    <thead>
                                    <tr style="background-color: #f3f9fd;">
                                        <th class="center-th" width="20%;">姓名</th>
                                        <th width="30%;">手机号</th>
                                        <th>邮箱</th>
                                    </tr>
                                    </thead>
                                    <tbody>

                                    {% for item in data.data.info.technology_contact %}
                                        <tr>
                                            <td class="center-th">{{ item.name }}</td>
                                            <td>{{ item.phone }}</td>
                                            <td>{{ item.email }}</td>
                                        </tr>
                                    {% endfor %}

                                    </tbody>
                                </table>
                            </div>
                            <div class="clearfix"></div>
                        </div>

                        <div class="com-item">
                            <div class="l-com-left fl a-line">其他联络人</div>
                            <div class="l-com-right">
                                <table class="table" style="table-layout:fixed;">
                                    <thead>
                                    <tr style="background-color: #f3f9fd;">
                                        <th class="center-th" width="20%;">姓名</th>
                                        <th width="30%;">手机号</th>
                                        <th>邮箱</th>
                                    </tr>
                                    </thead>
                                    <tbody>

                                    {% for item in data.data.info.other_contact %}
                                        <tr>
                                            <td class="center-th">{{ item.name }}</td>
                                            <td>{{ item.phone }}</td>
                                            <td>{{ item.email }}</td>
                                        </tr>
                                    {% endfor %}

                                    </tbody>
                                </table>
                            </div>
                            <div class="clearfix"></div>
                        </div>

                    </div>
                </div>
            </div>
        </div>

    {% endblock %}



{% block body %}{% endblock %}

{% block box %}

{% endblock %}

{% block javascript %}
    <script type="text/javascript">
        $(function () {
            SidebarHighlighting(4);

            $('.control-show').on('click', function() {
                var $this = $(this);

                $this.find('.d-down').toggleClass('d-up');

                var hasClass = $this.find('.d-down').hasClass('d-up');

                if (hasClass) {
                    $this.find('.d-blue').text('收起');
                } else {
                    $this.find('.d-blue').text('展开');
                }
                $this.parents('.event-type').find('.event-content').toggle();
            })

        })
    </script>
{% endblock %}